package com.laoxu.student.business.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laoxu.student.business.entity.Major;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.laoxu.student.business.vo.MajorVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 专业 Mapper 接口
 * </p>
 *
 * @author Laoxu
 * @since 2020-04-04
 */
public interface MajorMapper extends BaseMapper<Major> {
    /**
     *
     * @param page 前端传入
     * @return
     */
    @Select("SELECT m.*,d.`dept_name` FROM tb_major m,tb_department d WHERE m.dept_id=d.id")
    List<MajorVO> selectMajorList(Page page);

}
